<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('blog_config_items', function (Blueprint $table) {
            $table->id()->comment('编号');
            $table->integer('config_id')->comment('配置ID');
            $table->string('name')->comment('名称');
            $table->text('content')->comment('内容');
            $table->char('type')->default('string')
                ->comment('类型:string=字符串,image=图片');
            $table->integer('sort')
                ->unsigned()
                ->default(0)
                ->comment('序号');
            $table->timestamps();
            $table->softDeletes();
            $table->comment('【博客】系统配置项目表');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('blog_config_items');
    }
};
